package bb.lanxing.calc.data;

public class RowerPoint implements Cloneable, RecycleData {
    private int roweravgstrokerate;
    private double rowertotaldistance;
    private double rowerpace;
    private double roweravgpace; 
    private int rowerpower;
    private int roweravgpower;
    private int rowerresistancelevel;

    int rowerstrokerate;
    int rowerstrokecount;
    int rowerenergy;

    private int source = 2;

    public RowerPoint copy(RowerPoint reuse) {
        if (reuse == null) {
            reuse = new RowerPoint();
        }
        reuse.roweravgstrokerate = this.roweravgstrokerate;
        reuse.rowertotaldistance = this.rowertotaldistance;
        reuse.rowerpace = this.rowerpace;
        reuse.roweravgpace = this.roweravgpace;
        reuse.rowerpower = this.rowerpower;
        reuse.roweravgpower = this.roweravgpower;
        reuse.rowerresistancelevel = this.rowerresistancelevel;

        reuse.rowerstrokerate = this.rowerstrokerate;
        reuse.rowerstrokecount = this.rowerstrokecount;
        reuse.rowerenergy = this.rowerenergy;

        reuse.source = this.source;
        return reuse;
    }

    public RowerPoint clone() {
        try {
            return (RowerPoint) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
            return null;
        }
    }

    @Override
    public void recycle() {
        this.roweravgstrokerate = 0;
        this.rowertotaldistance = 0;
        this.rowerpace = 0;
        this.roweravgpace = 0;
        this.rowerpower = 0;
        this.roweravgpower = 0;
        this.rowerresistancelevel = 0;

        this.rowerstrokerate = 0;
        this.rowerstrokecount = 0;
        this.rowerenergy = 0;

        this.source = 2;
    }

    public int getRowerAvgStrokeRate() {
        return this.roweravgstrokerate;
    }
    public void setRowerAvgStrokeRate(int roweravgstrokerate) {
        this.roweravgstrokerate = roweravgstrokerate;
    }
    public double getRowerTotalDistance() {
        return this.rowertotaldistance;
    }
    public void setRowerTotalDistance(double rowertotaldistance) {
        this.rowertotaldistance = rowertotaldistance;
    }
    public double getRowerPace() {
        return this.rowerpace;
    }
    public void setRowerPace(double rowerpace) {
        this.rowerpace = rowerpace;
    }
    public double getRowerAvgPace() {
        return this.roweravgpace;
    }
    public void setRowerAvgPace(double roweravgpace) {
        this.roweravgpace = roweravgpace;
    }
    public int getRowerPower() {
        return this.rowerpower;
    }
    public void setRowerPower(int rowerpower) {
        this.rowerpower = rowerpower;
    }
    public int getRowerAvgPower() {
        return this.roweravgpower;
    }
    public void setRowerAvgPower(int roweravgpower) {
        this.roweravgpower = roweravgpower;
    }
    public int getRowerResistanceLevel() {
        return this.rowerresistancelevel;
    }
    public void setRowerResistanceLevel(int rowerresistancelevel) {
        this.rowerresistancelevel = rowerresistancelevel;
    }

    public int getRowerStrokeRate() {
        return this.rowerstrokerate;
    }
    public void setRowerStrokeRate(int rowerstrokerate) {
        this.rowerstrokerate = rowerstrokerate;
    }

    public int getRowerStrokeCount() {
        return this.rowerstrokecount;
    }
    public void setRowerStrokeCount(int rowerstrokecount) {
        this.rowerstrokecount = rowerstrokecount;
    }

    public int getRowerEnergy() {
        return this.rowerenergy;
    }
    public void setRowerEnergy(int rowerenergy) {
        this.rowerenergy = rowerenergy;
    }
    public int getSource() {
        return this.source;
    }
    public void setSource(int source) {
        this.source = source;
    }
}
